Skip to content

drivers: usb: usb_dc_numaker: make usbd_ep_fifo_copy_from_user void#102021

Merged
fabiobaltieri merged 2 commits intozephyrproject-rtos:mainfrom
moonlight83340:usb_dc_numaker_make_function_void
Jan 15, 2026
Merged

drivers: usb: usb_dc_numaker: make usbd_ep_fifo_copy_from_user void#102021
fabiobaltieri merged 2 commits intozephyrproject-rtos:mainfrom
moonlight83340:usb_dc_numaker_make_function_void

Conversation

@moonlight83340
Copy link
Copy Markdown
Contributor

numaker_usbd_ep_fifo_copy_from_user() never reports errors and always returns 0.
The error check at the call site is therefore dead code.

Make the function void and drop the unused error handling.

numaker_usbd_ep_fifo_copy_from_user() never reports errors and
always returns 0.
The error check at the call site is therefore dead code.

Make the function void and drop the unused error handling.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
@moonlight83340 moonlight83340 marked this pull request as ready for review January 9, 2026 15:46
@zephyrbot zephyrbot added the area: USB Universal Serial Bus label Jan 9, 2026
josuah
josuah previously approved these changes Jan 9, 2026
Copy link
Copy Markdown
Contributor

@josuah josuah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

static void numaker_usbd_setup_fifo_copy_to_user() is void, so it makes sense for copy_from_user() to be void too.

@ccli8
Copy link
Copy Markdown
Contributor

ccli8 commented Jan 13, 2026

For consistency, change both numaker_usbd_ep_fifo_copy_to_user and numaker_usbd_ep_fifo_copy_from_user to void.

numaker_usbd_ep_fifo_copy_to_user() never reports errors and always
returns 0.
The error check at the call site is therefore dead code.

Make the function void and drop the unused error handling.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
@sonarqubecloud
Copy link
Copy Markdown

@moonlight83340 moonlight83340 requested a review from josuah January 13, 2026 12:26
@fabiobaltieri fabiobaltieri merged commit 21c1417 into zephyrproject-rtos:main Jan 15, 2026
26 checks passed
@moonlight83340 moonlight83340 deleted the usb_dc_numaker_make_function_void branch January 15, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: USB Universal Serial Bus

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants